package com.javaweb.dao;

import com.javaweb.model.Article;

import java.util.Date;
import java.util.List;

public interface ArticleDao {
    /**
     * 新增新文章
     * @param article
     * @return
     */
    public int insert(Article article)  ;
    public int updateContent(Integer id, String newContent) ;

    /**
     * 更新article状态
     * @param id
     * @Param  status: 文章状态
     * @return
     */
    public int updateStatus(Integer id, Integer status) ;
    public int updateTitle(Integer id, String newTitle)  ;
    public int deleteById(Integer id) ;

    public List<Article> selectByUserId(Integer userId) ;

    public int selectId(Integer userId, String title, Date createTime) ;

    public List<Article> selectByKeyword(String keyword) ;



}
